﻿using System;
using V.Utility;

/// <summary>
/// 生成登录验证码
/// </summary>
public partial class _ValidCode : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Buffer = true;
        Response.Expires = 0;
        Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
        Response.CacheControl = "no-cache";

        ValidCode vc = new ValidCode();
        string strKey = "";
        byte[] data = vc.GenerateVerifyImage(4, ref strKey);
        Session["LoginValidCode"] = strKey.ToUpper();
        Response.OutputStream.Write(data, 0, data.Length);
    }
}